home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / gl_dev.idb / usr / include / gl / device.h.z / device.h
Encoding:
C/C++ Source or Header  |  1996-03-15  |  20.0 KB  |  537 lines

  1. #ifndef __GL_DEVICE_H__
  2. #define __GL_DEVICE_H__
  3. /**************************************************************************
  4.  *                                      *
  5.  *          Copyright (C) 1984, Silicon Graphics, Inc.          *
  6.  *                                      *
  7.  *  These coded instructions, statements, and computer programs  contain  *
  8.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  9.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  10.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  11.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  12.  *                                      *
  13.  **************************************************************************/
  14.  
  15. /*
  16.  * Device name space partitioning
  17.  *
  18.  *  0x0000 -> 0x0fff    devices defined by SGI
  19.  *    0x0001 -> 0x00ff        buttons
  20.  *    0x0100 -> 0x01ff        valuators
  21.  *    0x0200 -> 0x02ff        pseudo devices
  22.  *    0x0300 -> 0x0eff        reserved
  23.  *    0x0f00 -> 0x0fff        additional buttons
  24.  *
  25.  *  0x1000 -> 0x7fff    devices defined by users
  26.  *    0x1000 -> 0x2fff        buttons
  27.  *    0x3000 -> 0x3fff        valuators
  28.  *    0x4000 -> 0x7fff        pseudo devices
  29.  *
  30.  *  0x8000 -> 0xffff    can not be used
  31.  */
  32.  
  33. /* macros to test valuator and button numbers */
  34.  
  35. #define ISBUTTON(b)    (((b) >= BUTOFFSET) && ((b) < VALOFFSET) || \
  36.              ((b) >= BUT2OFFSET) && ((b) < USERVALOFFSET))
  37. #define ISVALUATOR(b)    (((b) >= VALOFFSET) && ((b) < PSEUDOFFSET) || \
  38.              ((b) >= USERVALOFFSET) && ((b) < USERPSEUDOFFSET))
  39.  
  40. #define ISTIMER(t)    (((t) >= TIMOFFSET) && ((t) < (TIMCOUNT+TIMOFFSET)))
  41. #define ISDIAL(t)    (((t) >= DIAL0) && ((t) <= DIAL8))
  42. #define ISLPEN(t)    (((t) == LPENX) || ((t) == LPENY))
  43. #define ISLPENBUT(t)    ((t) == LPENBUT)
  44. #define ISBPADBUT(t)    (((t) >= BPAD0) && ((t) <= BPAD3))
  45. #define ISSW(t)        (((t) >= SW0) && ((t) <= SW31))
  46. #define ISSTDKEYBD(t)    (((t) >= BUT0) && ((t) <= MAXKBDBUT))
  47. #define ISXKEYBD(t)    (((t) >= XKBDOFFSET) && ((t) < (XKBDCOUNT+XKBDOFFSET)))
  48. #define ISKEYBD(t)    (ISSTDKEYBD(t) || ISXKEYBD(t))
  49. #define ISSBALL(t)    (((t) >= SBTX) && ((t) <= SBPERIOD))
  50. #define ISSBALLBUT(t)    (((t) >= SBPICK) && ((t) <= SBBUT8))
  51. #define ISVIDEO(t)    ((t) == VIDEO)
  52.  
  53.  
  54. #define NULLDEV        0
  55. #define BUTOFFSET    1
  56. #define VALOFFSET    256        /* 0x0100 */
  57. #define PSEUDOFFSET    512        /* 0x0200 */
  58. #define BUT2OFFSET    3840        /* 0x0f00 */
  59.  
  60. #define TIMOFFSET    515
  61. #define XKBDOFFSET    143
  62.  
  63. #define BUTCOUNT    255
  64. #define VALCOUNT    256
  65.  
  66. #define TIMCOUNT    4
  67. #define XKBDCOUNT    28
  68.  
  69. #define USERBUTOFFSET    4096        /* 0x1000 */
  70. #define USERVALOFFSET    12288        /* 0x3000 */
  71. #define USERPSEUDOFFSET    16384        /* 0x4000 */
  72.  
  73. /*
  74.  * Button definitions for the base US keyboards
  75.  *
  76.  *                    button         button      kbd
  77.  *                    number         offset      hex  key
  78.  *                    ======       ===========   ===  ===== */
  79. #define BUT0         1    /* 0+BUTOFFSET,   0, "break" (83-key)    */
  80. #define BUT1         2    /* 1+BUTOFFSET,   1, "setup" (83-key)    */
  81. #define BUT2         3    /* 2+BUTOFFSET,   2, "left ctrl"     */
  82. #define BUT3         4    /* 3+BUTOFFSET,   3, "caps lock"     */
  83. #define BUT4         5    /* 4+BUTOFFSET,   4, "right shift"     */
  84. #define BUT5         6    /* 5+BUTOFFSET,   5, "left shift"     */
  85. #define BUT6         7    /* 6+BUTOFFSET,   6, "escape"        */
  86. #define BUT7         8    /* 7+BUTOFFSET,   7, "1"        */
  87. #define BUT8         9    /* 8+BUTOFFSET,   8, "tab"        */
  88. #define BUT9        10    /* 9+BUTOFFSET,   9, "Q"        */
  89. #define BUT10        11    /* 10+BUTOFFSET,  A, "A"        */
  90. #define BUT11        12    /* 11+BUTOFFSET,  B, "S"        */
  91. #define BUT12        13    /* 12+BUTOFFSET,  C, "no scroll" (83-key) */
  92. #define BUT13        14    /* 13+BUTOFFSET,  D, "2"        */
  93. #define BUT14        15    /* 14+BUTOFFSET,  E, "3"        */
  94. #define BUT15        16    /* 15+BUTOFFSET,  F, "W"        */
  95. #define BUT16        17    /* 16+BUTOFFSET, 10, "E"        */
  96. #define BUT17        18    /* 17+BUTOFFSET, 11, "D"        */
  97. #define BUT18        19    /* 18+BUTOFFSET, 12, "F"        */
  98. #define BUT19        20    /* 19+BUTOFFSET, 13, "Z"        */
  99. #define BUT20        21    /* 20+BUTOFFSET, 14, "X"        */
  100. #define BUT21        22    /* 21+BUTOFFSET, 15, "4"        */
  101. #define BUT22        23    /* 22+BUTOFFSET, 16, "5"        */
  102. #define BUT23        24    /* 23+BUTOFFSET, 17, "R"        */
  103. #define BUT24        25    /* 24+BUTOFFSET, 18, "T"        */
  104. #define BUT25        26    /* 25+BUTOFFSET, 19, "G"        */
  105. #define BUT26        27    /* 26+BUTOFFSET, 1A, "H"        */
  106. #define BUT27        28    /* 27+BUTOFFSET, 1B, "C"        */
  107. #define BUT28        29    /* 28+BUTOFFSET, 1C, "V"        */
  108. #define BUT29        30    /* 29+BUTOFFSET, 1D, "6"        */
  109. #define BUT30        31    /* 30+BUTOFFSET, 1E, "7"        */
  110. #define BUT31        32    /* 31+BUTOFFSET, 1F, "Y"        */
  111. #define BUT32        33    /* 32+BUTOFFSET, 20, "U"        */
  112. #define BUT33        34    /* 33+BUTOFFSET, 21, "J"        */
  113. #define BUT34        35    /* 34+BUTOFFSET, 22, "K"        */
  114. #define BUT35        36    /* 35+BUTOFFSET, 23, "B"        */
  115. #define BUT36        37    /* 36+BUTOFFSET, 24, "N"        */
  116. #define BUT37        38    /* 37+BUTOFFSET, 25, "8"        */
  117. #define BUT38        39    /* 38+BUTOFFSET, 26, "9"        */
  118. #define BUT39        40    /* 39+BUTOFFSET, 27, "I"        */
  119. #define BUT40        41    /* 40+BUTOFFSET, 28, "O"        */
  120. #define BUT41        42    /* 41+BUTOFFSET, 29, "L"        */
  121. #define BUT42        43    /* 42+BUTOFFSET, 2A, ";"        */
  122. #define BUT43        44    /* 43+BUTOFFSET, 2B, "M"        */
  123. #define BUT44        45    /* 44+BUTOFFSET, 2C, ","        */
  124. #define BUT45        46    /* 45+BUTOFFSET, 2D, "0"        */
  125. #define BUT46        47    /* 46+BUTOFFSET, 2E, "-"        */
  126. #define BUT47        48    /* 47+BUTOFFSET, 2F, "P"        */
  127. #define BUT48        49    /* 48+BUTOFFSET, 30, "["        */
  128. #define BUT49        50    /* 49+BUTOFFSET, 31, "'"        */
  129. #define BUT50        51    /* 50+BUTOFFSET, 32, "return"        */
  130. #define BUT51        52    /* 51+BUTOFFSET, 33, "."        */
  131. #define BUT52        53    /* 52+BUTOFFSET, 34, "/"        */
  132. #define BUT53        54    /* 53+BUTOFFSET, 35, "="        */
  133. #define BUT54        55    /* 54+BUTOFFSET, 36, "`"        */
  134. #define BUT55        56    /* 55+BUTOFFSET, 37, "]"        */
  135. #define BUT56        57    /* 56+BUTOFFSET, 38, "\"        */
  136. #define BUT57        58    /* 57+BUTOFFSET, 39, num pad "1"    */
  137. #define BUT58        59    /* 58+BUTOFFSET, 3A, num pad "0"    */
  138. #define BUT59        60    /* 59+BUTOFFSET, 3B, "line feed" (83-key) */
  139. #define BUT60        61    /* 60+BUTOFFSET, 3C, "back space"    */
  140. #define BUT61        62    /* 61+BUTOFFSET, 3D, "delete"        */
  141. #define BUT62        63    /* 62+BUTOFFSET, 3E, num pad "4"    */
  142. #define BUT63        64    /* 63+BUTOFFSET, 3F, num pad "2"    */
  143. #define BUT64        65    /* 64+BUTOFFSET, 40, num pad "3"    */
  144. #define BUT65        66    /* 65+BUTOFFSET, 41, num pad "."    */
  145. #define BUT66        67    /* 66+BUTOFFSET, 42, num pad "7"    */
  146. #define BUT67        68    /* 67+BUTOFFSET, 43, num pad "8"    */
  147. #define BUT68        69    /* 68+BUTOFFSET, 44, num pad "5"    */
  148. #define BUT69        70    /* 69+BUTOFFSET, 45, num pad "6"    */
  149. #define BUT70        71    /* 70+BUTOFFSET, 46, num pad "pf2" (83-key) */
  150. #define BUT71        72    /* 71+BUTOFFSET, 47, num pad "pf1" (83-key) */
  151. #define BUT72        73    /* 72+BUTOFFSET, 48, "left arrow"    */
  152. #define BUT73        74    /* 73+BUTOFFSET, 49, "down arrow"    */
  153. #define BUT74        75    /* 74+BUTOFFSET, 4A, num pad "9"    */
  154. #define BUT75        76    /* 75+BUTOFFSET, 4B, num pad "-"    */
  155. #define BUT76        77    /* 76+BUTOFFSET, 4C, num pad "," (83-key) */
  156. #define BUT77        78    /* 77+BUTOFFSET, 4D, num pad "pf4" (83-key) */
  157. #define BUT78        79    /* 78+BUTOFFSET, 4E, num pad "pf3" (83-key) */
  158. #define BUT79        80    /* 79+BUTOFFSET, 4F, "right arrow"    */
  159. #define BUT80        81    /* 80+BUTOFFSET, 50, "up arrow"        */
  160. #define BUT81        82    /* 81+BUTOFFSET, 51, num pad "enter"    */
  161. #define BUT82        83    /* 82+BUTOFFSET, 52, "space"        */
  162. #define MAXKBDBUT    83    /* BUT82 */
  163.  
  164. /* Mouse buttons, etc. */
  165. #define BUT100        101    /* 100+BUTOFFSET, Mouse button 1    */
  166. #define BUT101        102    /* 101+BUTOFFSET, Mouse button 2    */
  167. #define BUT102        103    /* 102+BUTOFFSET, Mouse button 3    */
  168. #define BUT103        104    /*          Light Pen Button    */
  169. #define BUT104        105    /*          Bitpad Button 0    */
  170. #define BUT105        106    /*          Bitpad Button 1    */
  171. #define BUT106        107    /*          Bitpad Button 2    */
  172. #define BUT107        108    /*          Bitpad Button 3    */
  173. #define BUT108        109    /*          Light Pen Valid    */
  174. #define BUT109        110    /*          UNUSED        */
  175.  
  176. /* Button box definitions */
  177. #define BUT110        111    /* 110+BUTOFFSET, Button box switch 0    */
  178. #define BUT111        112    /* 111+BUTOFFSET, Button box switch 1    */
  179. #define BUT112        113    /* 112+BUTOFFSET, Button box switch 2    */
  180. #define BUT113        114    /* 113+BUTOFFSET, Button box switch 3    */
  181. #define BUT114        115    /* 114+BUTOFFSET, Button box switch 4    */
  182. #define BUT115        116    /* 115+BUTOFFSET, Button box switch 5    */
  183. #define BUT116        117    /* 116+BUTOFFSET, Button box switch 6    */
  184. #define BUT117        118    /* 117+BUTOFFSET, Button box switch 7    */
  185. #define BUT118        119    /* 118+BUTOFFSET, Button box switch 8    */
  186. #define BUT119        120    /* 119+BUTOFFSET, Button box switch 9    */
  187. #define BUT120        121    /* 120+BUTOFFSET, Button box switch 10    */
  188. #define BUT121        122    /* 121+BUTOFFSET, Button box switch 11    */
  189. #define BUT122        123    /* 122+BUTOFFSET, Button box switch 12    */
  190. #define BUT123        124    /* 123+BUTOFFSET, Button box switch 13    */
  191. #define BUT124        125    /* 124+BUTOFFSET, Button box switch 14    */
  192. #define BUT125        126    /* 125+BUTOFFSET, Button box switch 15    */
  193. #define BUT126        127    /* 126+BUTOFFSET, Button box switch 16    */
  194. #define BUT127        128    /* 127+BUTOFFSET, Button box switch 17    */
  195. #define BUT128        129    /* 128+BUTOFFSET, Button box switch 18    */
  196. #define BUT129        130    /* 129+BUTOFFSET, Button box switch 19    */
  197. #define BUT130        131    /* 130+BUTOFFSET, Button box switch 20    */
  198. #define BUT131        132    /* 131+BUTOFFSET, Button box switch 21    */
  199. #define BUT132        133    /* 132+BUTOFFSET, Button box switch 22    */
  200. #define BUT133        134    /* 133+BUTOFFSET, Button box switch 23    */
  201. #define BUT134        135    /* 134+BUTOFFSET, Button box switch 24    */
  202. #define BUT135        136    /* 135+BUTOFFSET, Button box switch 25    */
  203. #define BUT136        137    /* 136+BUTOFFSET, Button box switch 26    */
  204. #define BUT137        138    /* 137+BUTOFFSET, Button box switch 27    */
  205. #define BUT138        139    /* 138+BUTOFFSET, Button box switch 28    */
  206. #define BUT139        140    /* 139+BUTOFFSET, Button box switch 29    */
  207. #define BUT140        141    /* 140+BUTOFFSET, Button box switch 30    */
  208. #define BUT141        142    /* 141+BUTOFFSET, Button box switch 31    */
  209.  
  210. /* Button definitions for the extended keyboard.  Although current keyboards
  211.  * are 101 or 102 keys, there are 112 positions and so that many values are
  212.  * reserved.
  213.  *
  214.  *                    button         button      kbd
  215.  *                    number         offset      hex  key
  216.  *                    ======       ===========   ===  ===== */
  217. #define BUT142        143    /* 142+BUTOFFSET, 53 "left ALT"        */
  218. #define BUT143        144    /* 143+BUTOFFSET, 54 "right ALT"    */
  219. #define BUT144        145    /* 144+BUTOFFSET, 55 "right ctrl"    */
  220. #define BUT145        146    /* 145+BUTOFFSET, 56 "F1"        */
  221. #define BUT146        147    /* 146+BUTOFFSET, 57 "F2"        */
  222. #define BUT147        148    /* 147+BUTOFFSET, 58 "F3"        */
  223. #define BUT148        149    /* 148+BUTOFFSET, 59 "F4"        */
  224. #define BUT149        150    /* 149+BUTOFFSET, 5A "F5"        */
  225. #define BUT150        151    /* 150+BUTOFFSET, 5B "F6"        */
  226. #define BUT151        152    /* 151+BUTOFFSET, 5C "F7"        */
  227. #define BUT152        153    /* 152+BUTOFFSET, 5D "F8"        */
  228. #define BUT153        154    /* 153+BUTOFFSET, 5E "F9"        */
  229. #define BUT154        155    /* 154+BUTOFFSET, 5F "F10"        */
  230. #define BUT155        156     /* 155+BUTOFFSET, 60 "F11"        */
  231. #define BUT156        157    /* 156+BUTOFFSET, 61 "F12"        */
  232. #define BUT157        158    /* 157+BUTOFFSET, 62 "print screen"    */
  233. #define BUT158        159    /* 158+BUTOFFSET, 63 "scroll lock"    */
  234. #define BUT159        160    /* 159+BUTOFFSET, 64 "pause"        */
  235. #define BUT160        161    /* 160+BUTOFFSET, 65 "insert"        */
  236. #define BUT161        162    /* 161+BUTOFFSET, 66 "home"        */
  237. #define BUT162        163    /* 162+BUTOFFSET, 67 "page up"        */
  238. #define BUT163        164    /* 163+BUTOFFSET, 68 "end"        */
  239. #define BUT164        165    /* 164+BUTOFFSET, 69 "page down"    */
  240. #define BUT165        166    /* 165+BUTOFFSET, 6A "num lock"        */
  241. #define BUT166        167    /* 166+BUTOFFSET, 6B num pad "/"    */
  242. #define BUT167        168    /* 167+BUTOFFSET, 6C num pad "*"    */
  243. #define BUT168        169    /* 168+BUTOFFSET, 6D num pad "+"    */
  244.  
  245. /*
  246.  * BUT169 (=170) through BUT179 (=180) are reserved for the remainder of
  247.  * the 112 key positions.
  248.  */
  249.  
  250. /*
  251.  * BUT181 through BUT189 are used for the nine buttons of the Space Ball.
  252.  *
  253.  * Codes through 255 inclusive are reserved for future use by SGI.
  254.  */
  255. #define BUT181        182    /* 181+BUTOFFSET, space ball button 0    */
  256. #define BUT182        183    /* 182+BUTOFFSET, space ball button 1    */
  257. #define BUT183        184    /* 183+BUTOFFSET, space ball button 2    */
  258. #define BUT184        185    /* 184+BUTOFFSET, space ball button 3    */
  259. #define BUT185        186    /* 185+BUTOFFSET, space ball button 4    */
  260. #define BUT186        187    /* 186+BUTOFFSET, space ball button 5    */
  261. #define BUT187        188    /* 187+BUTOFFSET, space ball button 6    */
  262. #define BUT188        189    /* 188+BUTOFFSET, space ball button 7    */
  263. #define BUT189        190    /* 189+BUTOFFSET, space ball button 8    */
  264.  
  265. /* other buttons */
  266.  
  267. #define MOUSE1        101    /* BUT100 */
  268. #define MOUSE2        102    /* BUT101 */
  269. #define MOUSE3        103    /* BUT102 */
  270. #define LEFTMOUSE    103    /* BUT102 */
  271. #define MIDDLEMOUSE    102    /* BUT101 */
  272. #define RIGHTMOUSE    101    /* BUT100 */
  273. #define LPENBUT        104    /* LIGHT PEN BUTTON */
  274. #define BPAD0        105    /* BITPAD BUTTON 0 */
  275. #define BPAD1        106    /* BITPAD BUTTON 1 */
  276. #define BPAD2        107    /* BITPAD BUTTON 2 */
  277. #define BPAD3        108    /* BITPAD BUTTON 3 */
  278. #define LPENVALID    109    /* LIGHT PEN VALID */
  279.  
  280. /* button box */
  281.  
  282. #define SWBASE        111    /* BUT110 */
  283. #define SW0        111    /* SWBASE */
  284. #define SW1        112    /* SWBASE+1 */
  285. #define SW2        113    /* SWBASE+2 */
  286. #define SW3        114    /* SWBASE+3 */
  287. #define SW4        115    /* SWBASE+4 */
  288. #define SW5        116    /* SWBASE+5 */
  289. #define SW6        117    /* SWBASE+6 */
  290. #define SW7        118    /* SWBASE+7 */
  291. #define SW8        119    /* SWBASE+8 */
  292. #define SW9        120    /* SWBASE+9 */
  293. #define SW10        121    /* SWBASE+10 */
  294. #define SW11        122    /* SWBASE+11 */
  295. #define SW12        123    /* SWBASE+12 */
  296. #define SW13        124    /* SWBASE+13 */
  297. #define SW14        125    /* SWBASE+14 */
  298. #define SW15        126    /* SWBASE+15 */
  299. #define SW16        127    /* SWBASE+16 */
  300. #define SW17        128    /* SWBASE+17 */
  301. #define SW18        129    /* SWBASE+18 */
  302. #define SW19        130    /* SWBASE+19 */
  303. #define SW20        131    /* SWBASE+20 */
  304. #define SW21        132    /* SWBASE+21 */
  305. #define SW22        133    /* SWBASE+22 */
  306. #define SW23        134    /* SWBASE+23 */
  307. #define SW24        135    /* SWBASE+24 */
  308. #define SW25        136    /* SWBASE+25 */
  309. #define SW26        137    /* SWBASE+26 */
  310. #define SW27        138    /* SWBASE+27 */
  311. #define SW28        139    /* SWBASE+28 */
  312. #define SW29        140    /* SWBASE+29 */
  313. #define SW30        141    /* SWBASE+30 */
  314. #define SW31        142    /* SWBASE+31 */
  315.  
  316. /* space ball buttons */
  317.  
  318. #define SBBASE        182    /* BUT181 */
  319. #define SBPICK        182    /* SBBASE */
  320. #define SBBUT1        183    /* SBBASE+1 */
  321. #define SBBUT2        184    /* SBBASE+2 */
  322. #define SBBUT3        185    /* SBBASE+3 */
  323. #define SBBUT4        186    /* SBBASE+4 */
  324. #define SBBUT5        187    /* SBBASE+5 */
  325. #define SBBUT6        188    /* SBBASE+6 */
  326. #define SBBUT7        189    /* SBBASE+7 */
  327. #define SBBUT8        190    /* SBBASE+8 */
  328.  
  329. /* standard keyboard */
  330.  
  331. #define AKEY        11    /* BUT10 */
  332. #define BKEY        36    /* BUT35 */
  333. #define CKEY        28    /* BUT27 */
  334. #define DKEY        18    /* BUT17 */
  335. #define EKEY        17    /* BUT16 */
  336. #define FKEY        19    /* BUT18 */
  337. #define GKEY        26    /* BUT25 */
  338. #define HKEY        27    /* BUT26 */
  339. #define IKEY        40    /* BUT39 */
  340. #define JKEY        34    /* BUT33 */
  341. #define KKEY        35    /* BUT34 */
  342. #define LKEY        42    /* BUT41 */
  343. #define MKEY        44    /* BUT43 */
  344. #define NKEY        37    /* BUT36 */
  345. #define OKEY        41    /* BUT40 */
  346. #define PKEY        48    /* BUT47 */
  347. #define QKEY        10    /* BUT9 */
  348. #define RKEY        24    /* BUT23 */
  349. #define SKEY        12    /* BUT11 */
  350. #define TKEY        25    /* BUT24 */
  351. #define UKEY        33    /* BUT32 */
  352. #define VKEY        29    /* BUT28 */
  353. #define WKEY        16    /* BUT15 */
  354. #define XKEY        21    /* BUT20 */
  355. #define YKEY        32    /* BUT31 */
  356. #define ZKEY        20    /* BUT19 */
  357. #define ZEROKEY        46    /* BUT45 */
  358. #define ONEKEY        8    /* BUT7 */
  359. #define TWOKEY        14    /* BUT13 */
  360. #define THREEKEY    15    /* BUT14 */
  361. #define FOURKEY        22    /* BUT21 */
  362. #define FIVEKEY        23    /* BUT22 */
  363. #define SIXKEY        30    /* BUT29 */
  364. #define SEVENKEY    31    /* BUT30 */
  365. #define EIGHTKEY    38    /* BUT37 */
  366. #define NINEKEY        39    /* BUT38 */
  367. #define BREAKKEY    1    /* BUT0 */
  368. #define SETUPKEY    2    /* BUT1 */
  369. #define CTRLKEY        3    /* BUT2 */
  370. #define LEFTCTRLKEY    CTRLKEY    /* BUT2 */
  371. #define CAPSLOCKKEY    4    /* BUT3 */
  372. #define RIGHTSHIFTKEY    5    /* BUT4 */
  373. #define LEFTSHIFTKEY    6    /* BUT5 */
  374. #define NOSCRLKEY    13    /* BUT12 */
  375. #define ESCKEY        7    /* BUT6 */
  376. #define TABKEY        9    /* BUT8 */
  377. #define RETKEY        51    /* BUT50 */
  378. #define SPACEKEY    83    /* BUT82 */
  379. #define LINEFEEDKEY    60    /* BUT59 */
  380. #define BACKSPACEKEY    61    /* BUT60 */
  381. #define DELKEY        62    /* BUT61 */
  382. #define SEMICOLONKEY    43    /* BUT42 */
  383. #define PERIODKEY    52    /* BUT51 */
  384. #define COMMAKEY    45    /* BUT44 */
  385. #define QUOTEKEY    50    /* BUT49 */
  386. #define ACCENTGRAVEKEY    55    /* BUT54 */
  387. #define MINUSKEY    47    /* BUT46 */
  388. #define VIRGULEKEY    53    /* BUT52 */
  389. #define BACKSLASHKEY    57    /* BUT56 */
  390. #define EQUALKEY    54    /* BUT53 */
  391. #define LEFTBRACKETKEY    49    /* BUT48 */
  392. #define RIGHTBRACKETKEY    56    /* BUT55 */
  393. #define LEFTARROWKEY    73    /* BUT72 */
  394. #define DOWNARROWKEY    74    /* BUT73 */
  395. #define RIGHTARROWKEY    80    /* BUT79 */
  396. #define UPARROWKEY    81    /* BUT80 */
  397. #define PAD0        59    /* BUT58 */
  398. #define PAD1        58    /* BUT57 */
  399. #define PAD2        64    /* BUT63 */
  400. #define PAD3        65    /* BUT64 */
  401. #define PAD4        63    /* BUT62 */
  402. #define PAD5        69    /* BUT68 */
  403. #define PAD6        70    /* BUT69 */
  404. #define PAD7        67    /* BUT66 */
  405. #define PAD8        68    /* BUT67 */
  406. #define PAD9        75    /* BUT74 */
  407. #define PADPF1        72    /* BUT71 */
  408. #define PADPF2        71    /* BUT70 */
  409. #define PADPF3        79    /* BUT78 */
  410. #define PADPF4        78    /* BUT77 */
  411. #define PADPERIOD    66    /* BUT65 */
  412. #define PADMINUS    76    /* BUT75 */
  413. #define PADCOMMA    77    /* BUT76 */
  414. #define PADENTER    82    /* BUT81 */
  415.  
  416. /* the extended keyboard */
  417.  
  418. #define LEFTALTKEY     143
  419. #define    RIGHTALTKEY     144
  420. #define    RIGHTCTRLKEY     145
  421. #define    F1KEY         146
  422. #define    F2KEY         147
  423. #define    F3KEY         148
  424. #define    F4KEY         149
  425. #define    F5KEY         150
  426. #define    F6KEY         151
  427. #define    F7KEY         152
  428. #define    F8KEY         153
  429. #define    F9KEY         154
  430. #define    F10KEY        155
  431. #define    F11KEY        156
  432. #define    F12KEY        157
  433. #define    PRINTSCREENKEY    158
  434. #define    SCROLLLOCKKEY    159
  435. #define    PAUSEKEY    160
  436. #define    INSERTKEY    161
  437. #define    HOMEKEY     162
  438. #define    PAGEUPKEY     163
  439. #define    ENDKEY        164
  440. #define    PAGEDOWNKEY    165
  441. #define    NUMLOCKKEY    166
  442. #define    PADVIRGULEKEY     167
  443. #define PADASTERKEY     168
  444. #define PADPLUSKEY     169
  445.  
  446. /* 
  447.  * By rights, we should define symbolic entries here for all of the new
  448.  * characters brought to us by ISO 8859-1.  In fact, since there is no
  449.  * current convention to avoid making new symbols that are unique, the
  450.  * danger of collison with existing user symbols is too high. 
  451.  */
  452.  
  453.  
  454. /* valuators */
  455.  
  456. #define SGIRESERVED    256    /* 0+VALOFFSET */
  457. #define DIAL0        257    /* 1+VALOFFSET */
  458. #define DIAL1        258    /* 2+VALOFFSET */
  459. #define DIAL2        259    /* 3+VALOFFSET */
  460. #define DIAL3        260    /* 4+VALOFFSET */
  461. #define DIAL4        261    /* 5+VALOFFSET */
  462. #define DIAL5        262    /* 6+VALOFFSET */
  463. #define DIAL6        263    /* 7+VALOFFSET */
  464. #define DIAL7        264    /* 8+VALOFFSET */
  465. #define DIAL8        265    /* 9+VALOFFSET */
  466. #define MOUSEX        266    /* 10+VALOFFSET */
  467. #define MOUSEY        267    /* 11+VALOFFSET */
  468. #define LPENX        268    /* 12+VALOFFSET */
  469. #define LPENY        269    /* 13+VALOFFSET */
  470. #define BPADX        270    /* 14+VALOFFSET */
  471. #define BPADY        271    /* 15+VALOFFSET */
  472. #define CURSORX        272    /* 16+VALOFFSET */
  473. #define CURSORY        273    /* 17+VALOFFSET */
  474. #define GHOSTX        274    /* 18+VALOFFSET */
  475. #define GHOSTY        275    /* 19+VALOFFSET */
  476.  
  477. /* Space Ball valuators */
  478.  
  479. #define SBTX        276    /* 20+VALOFFSET */
  480. #define SBTY         277    /* 21+VALOFFSET */
  481. #define SBTZ        278    /* 22+VALOFFSET */
  482. #define SBRX         279    /* 23+VALOFFSET */
  483. #define SBRY        280    /* 24+VALOFFSET */
  484. #define SBRZ         281    /* 25+VALOFFSET */
  485. #define SBPERIOD    282    /* 26+VALOFFSET */
  486.  
  487. /* timers */
  488.  
  489. #define TIMER0        515    /* 0+TIMOFFSET */
  490. #define TIMER1        516    /* 1+TIMOFFSET */
  491. #define TIMER2        517    /* 2+TIMOFFSET */
  492. #define TIMER3        518    /* 3+TIMOFFSET */
  493.  
  494. /* misc devices */
  495.  
  496. #define KEYBD        513    /* keyboard */
  497. #define RAWKEYBD    514    /* raw keyboard for keyboard manager */
  498. #define VALMARK        523    /* valuator mark */
  499. #define REDRAW        528    /* used by port manager to signal redraws */
  500. #define    INPUTCHANGE    534    /* input connected or disconnected */
  501. #define    QFULL        535    /* queue was filled */
  502. #define QREADERROR    538    /* qread error */
  503. #define WINFREEZE    539    /* user wants process in this win to shut up */
  504. #define WINTHAW        540    /* user wants process in this win to go again */
  505. #define REDRAWICONIC    541    /* used to signal redraw as an icon */
  506. #define WINQUIT        542    /* signal from user that app is to go away */
  507. #define DEPTHCHANGE    543    /* window stacking order changed */
  508. #define    WINSHUT        546    /* window shutdown */
  509. #define DRAWOVERLAY    547    /* overlay planes have been damaged */
  510. #define    VIDEO        548    /* video notification */
  511.  
  512. #define MENUBUTTON    RIGHTMOUSE /* the button used by dopup */
  513.  
  514.  
  515. /* 
  516.  * obsolete symbols 
  517.  */
  518.  
  519. #define    DEVICEDEF    __GL_DEVICE_H__
  520.  
  521. #define WINCLOSE    537    /* window close */
  522. #define    KEYBDFNAMES    544    /* function key names */
  523. #define    KEYBDFSTRINGS    545    /* function key strings */
  524. #define MAXSGIDEVICE    20000
  525.  
  526. /* these events only occur when using the mex window manager (3K Series) */
  527. #define GERROR        524    /* errors device */
  528. #define    WMSEND        529    /* data in proc's shmem */
  529. #define    WMREPLY        530    /* reply from port manager */
  530. #define    WMGFCLOSE    531    /* graphport is no longer being used */
  531. #define    WMTXCLOSE    532    /* textport is no longer being used */
  532. #define    MODECHANGE    533    /* the display mode has changed */
  533. #define    PIECECHANGE    536    /* change in the window pieces */
  534.  
  535.  
  536. #endif    /* !__GL_DEVICE_H__ */
  537.